<template>
  <div :style="{color}">
    我是C组件
  </div>
</template>

<script>
import { inject, reactive, toRefs } from 'vue'

export default {
  setup () {
    var color = inject('color')
    const state = reactive({
      count: 0,

    })
  
    return {
      ...toRefs(state),
      color
    }
  }
}
</script>

<style lang="css" scoped>

</style>